package com.ws.shop.common;

import java.util.HashMap;
import java.util.Map;

import com.ws.shop.util.StringUtil;

public class CommonData {
	
	//用户登录时状态描述
	public static final Map<Integer,String> MEMBER_STATU_MESSAGE = new HashMap<Integer,String>();
	//商品竞拍(数据量尽量少往外发，咱去不用)
	public static final Map<Integer,String> AUCTION_STATU_MESSAGE = new HashMap<Integer,String>();
	//最大连续登陆失败次数
	public static final int MAX_LOGIN_FAIL_COUNT = 5;
	//意见反馈的状态
	public static final Map<Integer,String> FEEDBACK_MESSAGE_STATUS = new HashMap<Integer,String>();
	
	static{
		MEMBER_STATU_MESSAGE.put(1, "正常");
		MEMBER_STATU_MESSAGE.put(2, "连续登陆失败锁定");
		
		AUCTION_STATU_MESSAGE.put(1, "用户不存在!");
		AUCTION_STATU_MESSAGE.put(2, "您还没有激活!");
		AUCTION_STATU_MESSAGE.put(3, "商品已经不存在!");
		AUCTION_STATU_MESSAGE.put(4, "竞拍还没有开始!");
		AUCTION_STATU_MESSAGE.put(5, "竞拍已经结束!");
		AUCTION_STATU_MESSAGE.put(6, "出价重复，等待别人出价后才能继续出价!");
		AUCTION_STATU_MESSAGE.put(7, "余额不足!");
		AUCTION_STATU_MESSAGE.put(8, "用户被锁定，请联系管理员!");
		AUCTION_STATU_MESSAGE.put(9, "更新状态失败!");
		
		FEEDBACK_MESSAGE_STATUS.put(0, "未回复");
		FEEDBACK_MESSAGE_STATUS.put(1, "已采纳");
		FEEDBACK_MESSAGE_STATUS.put(2, "未采纳");
	}
	
	public static String getMemberStatuMessage(int statu){
		String msg = MEMBER_STATU_MESSAGE.get(statu);
		if(StringUtil.isEmpty(msg)){
			return "账号异常，请联系管理员";
		}
		return msg;
	}
	
	
}
